<?php
include_once('baseModel.php');

class OrderStatus extends BaseModel {
  public $_table="orderStatus";
  
  public $id;
  public $isStaged;
  public $isCheckedOut;
  public $isReturned;
  public $order_id;

  function loadByOrderId($id) {
    $query = "SELECT * FROM " . $this->_table . " WHERE order_id = " . $id;
    $results = DBHelper::executeQuery($query);
    if(!$results) {
      return;
    }
    // we know there will be only one result
    $this->populateModel($results[0]);
    return $this;
  }
  
}



?>
